﻿@model ForumModel

@using Telerik.Web.Mvc.UI;
@Html.ValidationSummary(true)
@Html.HiddenFor(model => model.Id)

@(Html.LocalizedEditor<ForumModel, ForumLocalizedModel>("forumgroup-localized",
	@<table class="adminContent">
		<tr>
			<td class="adminTitle">
				@Html.SmartLabelFor(model => model.Locales[item].Name)
			</td>
			<td class="adminData">
				@*IMPORTANT: Do not delete, this hidden element contains the id to assign localized values to the corresponding language *@
				@Html.HiddenFor(model => model.Locales[item].LanguageId)

				@Html.EditorFor(model => Model.Locales[item].Name)
				@Html.ValidationMessageFor(model => model.Locales[item].Name)
			</td>
		</tr>
		<tr>
			<td class="adminTitle">
				@Html.SmartLabelFor(model => model.Locales[item].SeName)
			</td>
			<td class="adminData">
				@Html.EditorFor(model => model.Locales[item].SeName)
				@Html.ValidationMessageFor(model => model.Locales[item].SeName)
			</td>
		</tr>
		<tr>
			<td class="adminTitle">
				@Html.SmartLabelFor(model => model.Locales[item].Description)
			</td>
			<td class="adminData">
				@Html.TextAreaFor(model => model.Locales[item].Description)
				@Html.ValidationMessageFor(model => model.Locales[item].Description)
			</td>
		</tr>
	</table>
    ,
	@<table class="adminContent">
		<tr>
			<td class="adminTitle">
				@Html.SmartLabelFor(model => model.Name)
			</td>
			<td class="adminData">
				@Html.EditorFor(model => model.Name)
				@Html.ValidationMessageFor(model => model.Name)
			</td>
		</tr>
		<tr>
			<td class="adminTitle">
				@Html.SmartLabelFor(model => model.SeName)
			</td>
			<td class="adminData">
				@Html.EditorFor(x => x.SeName)
				@if (Model.Id != 0)
                {
                    @Html.Action("NamesPerEntity", "UrlRecord", new { entityName = "Forum", entityId = Model.Id })
                }
				@Html.ValidationMessageFor(model => model.SeName)
			</td>
		</tr>
		<tr>
			<td class="adminTitle">
				@Html.SmartLabelFor(model => model.Description)
			</td>
			<td class="adminData">
				@Html.TextAreaFor(model => model.Description)
				@Html.ValidationMessageFor(model => model.Description)
			</td>
		</tr>
	</table>
))

<table class="adminContent">
	<tr>
		<td class="adminTitle">
			@Html.SmartLabelFor(model => model.ForumGroupId)
		</td>
		<td class="adminData">
			@Html.DropDownListFor(model => model.ForumGroupId, Model.ForumGroups.Select(x => new SelectListItem { Value = x.Id.ToString(), Text = x.Name }))
			@Html.ValidationMessageFor(model => model.ForumGroupId)
		</td>
	</tr>
	<tr>
		<td class="adminTitle">
			@Html.SmartLabelFor(model => model.DisplayOrder)
		</td>
		<td class="adminData">
			@Html.EditorFor(model => model.DisplayOrder)
			@Html.ValidationMessageFor(model => model.DisplayOrder)
		</td>
	</tr>
</table>
